package com.newtouch.avmarketing.mgr.modules.avmarkrting.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtil implements InitializingBean {

    //读取配置文件
    @Value("${ocr.WEBOCR_URL}") //地域节点
    private String webocrUrl;

    @Value("${ocr.APPID}")
    private String appId;

    @Value("${ocr.API_KEY}")
    private String apiKey;

    @Value("${ocr.ENGINE_TYPE}")
    private String engineType;

    public static String WEBOCR_URL;
    public static String APPID;
    public static String API_KEY;
    public static String ENGINE_TYPE;
    @Override
    public void afterPropertiesSet() throws Exception {
        WEBOCR_URL=webocrUrl;
        APPID=appId;
        API_KEY=apiKey;
        ENGINE_TYPE=engineType;
    }
}
